from django.shortcuts import render, HttpResponse, redirect

def index(request):
    """ 页面 """
    return render(request, "index.html")

def logout(request):
    """ 用户退出登录 """
    request.session.flush() # 清空当前用户的session地址，清空就等于退出了
    return redirect('index')